package com.tedu.bill.demo2;

/**
 * Author：毕龙
 * Date: 2024/5/19 9:12
 */
public class TestSimpleLinked {
    public static void main(String[] args) {
        MyLinked myLinked = new MyLinked();
        myLinked.add("王伟");
        myLinked.add("小华");
        myLinked.add("小华");
        myLinked.add("龙龙");
        Object o = myLinked.get(2);
        System.out.println(o);
        o = myLinked.get(1);
        System.out.println(o);
        o = myLinked.get(3);
        System.out.println(o);
        System.out.println("======================");
        myLinked.forEach();
        myLinked.add("泽豪",1);
        myLinked.forEach();
        myLinked.add("子枭",2);
        myLinked.forEach();

        myLinked.remove(0);
        System.out.println("======================");
        myLinked.forEach();
        myLinked.remove(5);
        System.out.println("======================");
        myLinked.forEach();
        myLinked.remove(1);
        System.out.println("======================");
        myLinked.forEach();


    }
}
